<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="../../css/public.css">
	<style type="text/css">
		.headimg {
			width: 30px;
			height: 30px;
		}
		.userinfo{
			display: flex;
		}
		.layui-table-cell{
			text-align: center;
		}
		.laytable-cell-1-0-0{
			height: 60px;
			text-align: left;
			/* text-align: center; */
		}
		.laytable-cell-1-0-2{
			height: 60px;
		}
		.shouinfo{
			line-height: 20px;
		}
		.gang{
			line-height: 60px;
		}
		.laytable-cell-1-0-0 span, .laytable-cell-1-0-2 span{
			line-height: 60px;
		}
		.userimg{
			width: 50px;
			height: 50px;
			margin-right: 5px;
		}
		.userimg .headimg{
			width: 50px;
			height: 100%;	
		}
		.nick{
			white-space: nowrap;
			text-overflow: ellipsis;
			overflow: hidden;
		}
	</style>
</head>

<body>
	<div class="layui-form">
		<table id="tableList" class="layui-table" lay-filter="tableList" lay-skin="line"
			lay-data="{url:baseUrl('order/'), cellMinWidth: 150, id: 'tableListTable', page:true, limits: [30, 50, 100],limit: 30,request: {pageName: 'page', limitName: 'size'}}">
			<thead>
				<tr>
					<th lay-data="{width: 180,templet: '#templetTX1'}">用户信息</th>
					<th lay-data="{field:'name'}">商品名称</th>
					<th lay-data="{width:180,templet: '#templetTX2'}">收件人信息</th>
					<th lay-data="{templet: '#templetDT1'}">创建时间</th>
					<th lay-data="{templet: '#templetDT2'}">发货时间</th>
					<th lay-data="{field:'type',templet: '#templetZT1'}">订单类型</th>
					<th lay-data="{width:100,field:'state',templet: '#templetZT2'}">订单状态</th>
					<th lay-data="{width:100,templet: '#templetWl1'}">物流公司</th>
					<th lay-data="{width:100,templet: '#templetWL2'}">物流状态</th>
					<th lay-data="{width:100,templet: '#tableListBar'}">操作</th>
				</tr>
			</thead>
		</table>

		<!--模板-->
		<script type="text/html" id="templetTX1">
			<div class="userinfo">
				<div class="userimg">
					<img src="{{d.headurl}}" class="headimg" />	
				</div>
				<div class="username">
					<p class="nick">{{d.nick}}</p>
					<p>{{d.tel}}</p>
				</div>
			</div>
		</script>
		<script type="text/html" id="templetTX2">
			{{# if(d.wuliu_id==''||d.wuliu_id==null){  }}	
					<div class="gang">--</div>
			{{# }else{ }}
					<div class="shouinfo">
						<div>{{d.wuliu_id.name}}</div>
						<div>{{d.wuliu_id.address}}</div>
						<div>{{d.wuliu_id.tel}}</div>
					</div>
			{{# } }}
		</script>
		<script type="text/html" id="templetDT1">
			{{js.format_datetime(d.dt)}}
		</script>
		<script type="text/html" id="templetDT2">
			{{# if(d.delivery_time==''||d.delivery_time==null){  }}	
					<div>--</div>
			{{# }else{ }}
					{{js.format_datetime(d.delivery_time)}}
			{{# } }}
		</script>
		<script type="text/html" id="templetZT1">
			{{# if(d.type==1){  }}						
					<div style="color:#FFB800">拍卖中拍</div>
			{{# }else if(d.type==2){  }}				
					<div style="color:#009688">定期抽奖</div>
			{{# }else if(d.type==3){ }}	
				   <div style="color:#5FB878">九宫格抽奖</div>
			{{# } }}
		</script>
		<script type="text/html" id="templetZT2">
			{{# if(d.state==1){  }}						
					<div class="layui-btn layui-btn-xs">待支付</div>
			{{# }else if(d.state==2){  }}				
					<div class="layui-btn layui-btn-xs">待确认地址</div>
			{{# }else if(d.state==3){ }}	
					<div class="layui-btn layui-btn-xs layui-btn-warm">待发货</div>
			{{# }else if(d.state==4){ }}
					<div style="color:gray;">已发货</div>
			{{# }else if(d.state==5){ }}								
					<div style="color:grey">已失效</div>
			{{# } }}
		</script>
		<script type="text/html" id="templetWl1">
			{{# if(d.wuliuc_id==''||d.wuliuc_id==null){  }}	
						<div>--</div>
			{{# }else{ }}			
						<div>{{d.wuliuc_id}}</div>
			{{# } }}
		</script>
		<script type="text/html" id="templetWL2">
			{{# if(d.wuliu_id==''||d.wuliu_id==null){  }}	
						<div>--</div>
			{{# }else if(d.wuliu_id.state==0){  }}					
					<div style="color:gray;">已删除</div>
			{{# }else if(d.wuliu_id.state==1){  }}				
					<a style="color:#01AAED">正常</a>
			{{# } }}
		</script>
		<script type="text/html" id="tableListBar">
			{{# if(d.state==3){  }}		
				<a class="layui-btn layui-btn-xs layui-btn-danger " lay-event="send" >发货</a>
			{{# }else if(d.state==4){  }}	
				<a class="layui-btn layui-btn-xs " lay-event="edit">编辑发货</a>
			{{# }else if(d.state==2||d.state==1||d.state==5){  }}
				<div>--</div>
			{{# } }}
			<!-- <a class="layui-btn layui-btn-xs " lay-event="edit">编辑发货</a> -->
		</script>
	</div>
	<script type="text/javascript" src="../../layui/layui.js"></script>
	<script type="text/javascript" src="../../js/jsCtl.js"></script>
	<script type="text/javascript" src="index.js"></script>
</body>

</html>